<template>
	<view class="page">
		<view class="list">
			<view class="item" v-for="item in list">
				<view class="name" @click="toDetail(item.info)">
				{{item.info.name}} 
				<span class="goLabel">+{{item.money}}元</span>
				</view>
				<view class="text" @click="toDetail(item.info)">预约时间：<text class="fr">{{item.info.appointmenttime}}</text></view>
				<view class="text" @click="toDetail(item.info)">物品重量：<text class="fr">{{kgList[item.info.kg]}}</text></view>
				<view class="bottom">
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				state:0,
				page:1,
				pagesize:10000,
				list:[],
				kgList:["0~10kg","10~50kg","50~100kg","100kg以上"]
			}
		},
		methods: {
			changeState(state){
				this.state = state;
				this.getList()
			},
			getList(){
				this.$get('user/moneylog', {
					
				}, (res) => {
					console.log(res)
					this.list = res
				})
			},
			editOrder(item){
				uni.navigateTo({
					url:"/pages/appointment/appointment?id="+item.id
				})
			},
			toDetail(item){
				uni.navigateTo({
					url:"/pages/order/info?id="+item.id
				})
			},
			evaluate(item){
				uni.navigateTo({
					url:"/pages/evaluate/evaluate?id="+item.id
				})
			},
		},
		onLoad(options) {
			
		},
		onShow() {
			this.getList()
		}
	}
</script>

<style>
	.page{
	}
	.status_box{
		display: flex;
		background-color: #FFFFFF;
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
	}
	.status_box .status{
		flex: 1;
		margin: 0 30rpx;
		text-align: center;
		height: 80rpx;
		line-height: 80rpx;
		font-size: 30rpx;
	}
	.status_box .status.active{
		color: #22BF8A;
		border-bottom: 1px solid #22BF8A;
	}
	.list{
		padding: 20rpx 30rpx;
	}
	.list .item{
		background-color: #FFFFFF;
		padding: 30rpx 0;
		border-radius: 8rpx;
		margin-bottom: 20rpx;
	}
	.list .item .name{
		padding: 0 40rpx;
		font-size: 36rpx;
		margin-bottom: 30rpx;
		font-weight: bold;
	}
	.list .item .goLabel{
		font-size: 24rpx;
		float: right;
		font-weight: normal;
		color: #22BF8A;
		line-height: 50rpx;
	}
	.textRed{
		font-size: 24rpx;
		float: right;
		font-weight: normal;
		color: #dd2727;
		line-height: 50rpx;
	}
	.list .item .text{
		line-height: 60rpx;
		font-size: 26rpx;
		padding: 0 40rpx;
	}
	.list .item .bottom{
		text-align: right;
		border-top: 1px solid #E5E5E5;
		margin-top: 20rpx;
		padding-top: 20rpx;
		
	}
	.list .item .bottom text{
		margin-right: 20rpx;
		padding: 0 34rpx;
		line-height: 60rpx;
		font-size: 26rpx;
		border: 1px solid #E5E5E5;
		border-radius: 4px;
		display: inline-block;
	}
</style>
